import request from "@/utils/http";

/**
 *
 * @param {*} id 商品id
 * @returns 商品详情数据
 */
export const getDetail = (id) => {
  return request({
    url: "/goods",
    params: {
      id,
    },
  });
};

/**
 *
 * @param {*} params id type limit
 * @returns
 */
export const getHotGoodsAPI = ({ id, type, limit = 3 }) => {
  return request({
    url: "/goods/hot",
    params: {
      id,
      type,
      limit,
    },
  });
};
